create

inline suspend fun <T : BaseModel> create(sub: String, body: String, expandRelations: ExpandRelations = ExpandRelations(), showFields: ShowFields = ShowFields()): T

Creates a new record and gets the record

Parameters

sub

The collection you wish to preform this action on

body

JSON data used to create the record in the form of a string


inline suspend fun <T : BaseModel> create(sub: String, body: Map<String, JsonPrimitive>, files: List<FileUpload>, expandRelations: ExpandRelations = ExpandRelations(), showFields: ShowFields = ShowFields()): T

Creates a new record and gets the record

Parameters

sub

The collection you wish to preform this action on

body

the key value data used to create the record

files

the files you wish to upload